﻿@model IEnumerable<WStest.Models.PostitView>

@section featured {
<section class="featured">
    <div class="content-wrapper">
        <hgroup class="title">
            <h1>Postits</h1>
            <h2>View your postits here</h2>
        </hgroup>
    </div>
</section>
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (@Html.BeginForm("Create", "Postit", "POST"))
{
    <div>
        <div>
            @Html.Label("Make a postit")
            @Html.Editor("Content")
            <input type="submit" value="Post it" />
        </div>

        <table>
        <tr>
            <th>Posted by:</th>
            <th>Date</th>
        </tr>
            @{
                foreach (WStest.Models.PostitView postit in Model)
                {
                    <tr>
                        <td>@postit.username</td>
                        <td>@postit.date</td>
                    </tr>
                    <tr>
                        <td><b>Content:</b> @postit.content</td>
                    </tr>
                <tr></tr>
                }
            }
        </table>
    </div>
}
